package com.example.homework1;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class register extends AppCompatActivity {
    private Button submitBtn;
    private EditText et_name;
    private EditText et_pwd;
    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        submitBtn = (Button) findViewById(R.id.regBtn);
        submitBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                submit();
            }
        });
    }
    public void submit(){
        Intent intent = new Intent(this, show.class);
        et_name = findViewById(R.id.editRegName);
        et_pwd = findViewById(R.id.editRegPwd);
        intent.putExtra("name",et_name.getText().toString().trim());
        intent.putExtra("pwd",et_pwd.getText().toString().trim());
        startActivity(intent);
    }
}